{% extends 'base.html' %}
{% block content %}
<div class="container mt-4">
  <h2>编辑帖子</h2>
  <form method="post">
    <div class="mb-3">
      <label for="title" class="form-label">标题</label>
      <input type="text" class="form-control" id="title" name="title" value="{{ post.title }}" required>
    </div>
    <div class="mb-3">
      <label for="content" class="form-label">内容</label>
      <textarea class="form-control" id="content" name="content" rows="10" required>{{ post.content }}</textarea>
    </div>
    <button type="submit" class="btn btn-primary">提交修改</button>
    <a href="{{ url_for('post_detail', post_id=post.id) }}" class="btn btn-secondary">取消</a>
  </form>
</div>
{% endblock %}
